import VueRouter from 'vue-router'

import Login from '../components/login.vue'
import Register from '../components/register.vue'
import Home from '../components/home.vue'
import Car from '../components/car.vue'
import Set from '../components/set.vue'

//首页子组件
import Music from '../components/home/music.vue'
import Shop from '../components/home/shop.vue'

const router = new VueRouter({
    // mode: 'history',
    routes:[
        {
            path: '/',
            components:{
                home: Home,
                login: Login,
                register: Register,
                car: Car,
                set: Set,

                // home页面子页面
                music: Music,
                shop: Shop
            }
        }
    ],
    linkActiveClass: 'mui-active'
})

export default router